﻿using System;
using System.Collections.Generic;

using System.Text;
using Data;
using Entity;
using System.Data;

namespace Business
{
    public class Province_Bussiness
    {
        public bool Add_Province(Province_Entity province)
        {
            Province_Data add_province = new Province_Data();
            return add_province.Insert_Province(province);
        }

        public DataTable LoadP() 
        {
            Province_Data pro = new Province_Data();
            try
            {
                return pro.LoadP();
            }
            catch
            {
                throw;
            }
            finally 
            {
                pro = null;
            }
        }

        public int Update(int provinceID, string provinceName, int pricehcmc) 
        {
            Province_Data pr = new Province_Data();
            try
            {
                return pr.Update_Province(provinceID, provinceName, pricehcmc);
            }
            catch 
            {
                throw;
            }
            finally
            {
                pr = null;
            }
        }

        public int Delete(int procinceID) 
        {
            Province_Data pDa = new Province_Data();
            try 
            {
                return pDa.Delete_Province(procinceID);
            }
            catch 
            {
                throw;
            }
            finally 
            {
                pDa = null;
            }
        }

    }
}
